#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<limits.h>
#include"parse.h"
//global buffer for parser
char buf[LINE_MAX];

char* read_data(char* filename){
	FILE *fp;
		fp = fopen(filename,"r");
		if(fp == NULL){
			perror("invalid filename\n");
			exit(EXIT_SUCCESS);
		}
		while(fgets(buf,LINE_MAX,fp)!=NULL){
		}
		fclose(fp);
	return &(buf[0]);
}
/*
int main(){
	char* filen = "statement.txt";
	char* res;
	res = read_data(filen);
	printf("result: %s\n",res);
	
	
	return 0;
}
*/
